#include <iostream>
#include <string>
#include <cctype>

using namespace std;

class Solution {
public:
	bool isPalindrome(string s) {
		if(s.length()==0)
			return true;
		
		string loweralpha=toalphalower(s);
		for(int i=0;i<loweralpha.length()/2;++i){
			if(loweralpha[i]!=loweralpha[loweralpha.length()-1-i])
				return false;
		}

		return true;	
	}

private:
	string toalphalower(string origin){
		string cleaned="";
		for(int i=0;i<origin.length();i++)
		{
			if(isalnum(origin[i])){
				cleaned+=tolower(origin[i]);			
			}
		}
		return cleaned;
	}
};

int main(){
	string s;
	cin>>s;
	Solution solution;
	if(solution.isPalindrome(s)){
		cout<<s+" is Palindrome"<<endl;
	}else{
	cout<<s+" is not Palindrome"<<endl;
	}
}